﻿using System;
using System.Net;
using System.Text;

namespace Storage.Core
{
	internal interface IBinarySerializer
	{
		int Position { get; }
		bool CanSeek { get; }
		IBinarySerializer Seek(int position);
		IBinarySerializer SeekToEnd();

		IBinarySerializer Write(bool b);
		IBinarySerializer Write(byte b);
		IBinarySerializer Write(Int16 i);
		IBinarySerializer Write(Int32 i);
		IBinarySerializer Write(Int64 i);
		IBinarySerializer Write(UInt16 i);
		IBinarySerializer Write(UInt32 i);
		IBinarySerializer Write(UInt64 i);
		IBinarySerializer Write(float f);
		IBinarySerializer Write(double d);
		IBinarySerializer Write(string s, Encoding encoding);
		IBinarySerializer Write(string s);
		IBinarySerializer Write(byte[] b, int byteOffset, int count);
		IBinarySerializer Write(byte[] b);
		IBinarySerializer Write(Guid guid);
		IBinarySerializer Write(IPAddress ip);
		IBinarySerializer Write(IPEndPoint endPoint);
		IBinarySerializer Write(TimeSpan ts);
		IBinarySerializer Write(DateTime dt);
	}
}
